home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 September / PCWorld_2008-09_cd.bin / v cisle / sadanastroju / autocomplete_manager-2.3-fx.xpi / chrome / acmanager.jar / content / openlocation-overlay.xul < prev    next >
Extensible Markup Language  |  2008-03-14  |  4KB  |  98 lines

  1. <?xml version="1.0"?>
  2.  
  3. <!-- ***** BEGIN LICENSE BLOCK *****
  4.    - Version: MPL 1.1
  5.    -
  6.    - The contents of this file are subject to the Mozilla Public License Version
  7.    - 1.1 (the "License"); you may not use this file except in compliance with
  8.    - the License. You may obtain a copy of the License at
  9.    - http://www.mozilla.org/MPL/
  10.    -
  11.    - Software distributed under the License is distributed on an "AS IS" basis,
  12.    - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13.    - for the specific language governing rights and limitations under the License.
  14.    -
  15.    - The Original Code is the Autocomplete Manager extension.
  16.    -
  17.    - The Initial Developer of the Original Code is
  18.    - Nikitas Liogkas <nikitas@acm.org>.
  19.    - Portions created by the Initial Developer are Copyright (C) 2005-2008
  20.    - the Initial Developer. All Rights Reserved.
  21.    -
  22.    - Contributor(s):
  23.    - Version 2.3
  24.    -
  25.    - ***** END LICENSE BLOCK ***** -->
  26.  
  27. <!-- stylesheets have to be outside the overlay -->
  28. <?xml-stylesheet href="chrome://acmanager/skin/acmanager.css" type="text/css"?> 
  29.  
  30. <!DOCTYPE overlay SYSTEM "chrome://browser/locale/openLocation.dtd">
  31.  
  32. <overlay id="openlocation-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  33.  
  34.   <script type="application/javascript; version=1.7" src="chrome://acmanager/content/rdfUtils.js"/>
  35.   <script type="application/javascript" src="chrome://acmanager/content/acpopup.js"/>
  36.   <script type="application/javascript" src="chrome://acmanager/content/aggregator.js"/>
  37.   <script type="application/javascript" src="chrome://acmanager/content/filterer.js"/> 
  38.   <script type="application/javascript" src="chrome://acmanager/content/options.js"/>
  39.   
  40.   <!-- custom location bar; we hide the default one, and use this instead -->
  41.   <dialog id="openLocation"
  42.     onload="if (acm_getPreference(ACM_ACTIVE_COMPONENT) !== 'default') {
  43.               /* code taken from chrome://content/browser/openLocation.js::onLoad() */
  44.               document.getElementById('openWhereList').selectedItem = document.getElementById('currentWindow');
  45.               var value = acm_prefs.getIntPref('general.open_location.last_window_choice');
  46.               var element = document.getElementById('openWhereList').getElementsByAttribute('value', value)[0];
  47.               if (element)
  48.                 document.getElementById('openWhereList').selectedItem = element;
  49.  
  50.               document.getElementById('urlbar').value = acm_prefs.getComplexValue(
  51.                 'general.open_location.last_url', Components.interfaces.nsISupportsString).data;  
  52.               if (document.getElementById('urlbar').value)
  53.                 document.getElementById('urlbar').select();
  54.             }
  55.             else
  56.               onLoad();"
  57.  
  58.     ondialogaccept="if (acm_getPreference(ACM_ACTIVE_COMPONENT) !== 'default')
  59.                       acm_loadURL();
  60.                     else
  61.                       open();">
  62.  
  63.     <!-- will be moved to its proper place in acm_activateEnhancedOpenWebLocationSubUrlbar() -->
  64.     <hbox id="urlbar-hbox" align="center" position="5">
  65.       <textbox id="urlbar" 
  66.                flex="1" 
  67.                type="autocomplete"
  68.                enablehistory="true"/>
  69.       <button label="&chooseFile.label;" oncommand="acm_onChooseFile();"/>
  70.     </hbox>
  71.  
  72.     <popup
  73.       style="-moz-binding: url('chrome://acmanager/content/acpopup.xml#acm_popup')"
  74.       id="ACM_Popup"
  75.       ignorekeys="true"
  76.       onclick="acm_popupMouseClick(event, this);"
  77.       onmousemove="acm_popupMouseMove(event);"
  78.       onpopuphidden="acm_preventPopup = false; 
  79.                      if (acm_getPreference(ACM_INLINE)) {
  80.                        const urlbar = document.getElementById('urlbar');
  81.                        urlbar.setSelectionRange(urlbar.textLength, urlbar.textLength); 
  82.                      }
  83.                      acm_maxrows = acm_getPreference(ACM_MAXROWS);"/>
  84.   </dialog>
  85.  
  86.   <commandset>
  87.     <!-- command to temporarily disable the popup -->
  88.     <command id="cmd_focusURLBar" 
  89.       oncommand="document.getElementById('urlbar').select(); acm_disablePopup = true;"/>
  90.   </commandset>
  91.  
  92.   <keyset>
  93.     <!-- keyboard shortcut to temporarily disable the popup -->
  94.     <key modifiers="alt" key="L" command="cmd_focusURLBar"/>
  95.   </keyset>
  96.  
  97. </overlay>
  98.